<template>
  <div id="sidebar" class="sidebar responsive ace-save-state">
    <div class="sidebar-shortcuts" id="sidebar-shortcuts">
      <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
        <button class="btn btn-success">
          <i class="ace-icon fa fa-signal"></i>
        </button>
        <button class="btn btn-info">
          <i class="ace-icon fa fa-pencil"></i>
        </button>
        <button class="btn btn-warning">
          <i class="ace-icon fa fa-users"></i>
        </button>
        <button class="btn btn-danger">
          <i class="ace-icon fa fa-cogs"></i>
        </button>
      </div>
    </div>

    <ul class="nav nav-list">
      <li class="">
        <a v-on:click="toPage('/')">
          <i class="menu-icon fa fa-list"></i>
          <span class="menu-text"> 我的工作台 </span>
        </a>
        <b class="arrow"></b>
      </li>
      <li class="">
        <a v-on:click="toPage('/sys/org')">
          <i class="menu-icon fa fa-list"></i>
          <span class="menu-text"> org </span>
        </a>
        <b class="arrow"></b>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'app-left',
  data () {
    return {
      msg: 'left'
    }
  },
  methods: {
    toPage: function (url) {
      this.$router.push(url);
    }
  },
  created: function() {
    $.ajax({
      url: "/api/sys/menu/list",
      type: "GET",
      datType: "JSON",
    }).done((result) => {
      console.log(result);
    });
  }
}
</script>
